package at.guigu.controller;


import at.guigu.domain.query.PageQuery;
import at.guigu.domain.vo.PageVo;
import at.guigu.domain.vo.UserVo;
import at.guigu.service.IUserService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author cgrs572
 * @since 2024-12-30
 */
@RestController
@RequestMapping("/user")
// 构造器依赖注入
@AllArgsConstructor
public class UserController {

    private IUserService userService;

    /**
     * 分页查询
     */
    @GetMapping("/page")
    public PageVo<UserVo> queryUserByPage(PageQuery pageQuery) {
        return userService.queryUserByPage(pageQuery);
    }
}